package com.example.demo.entity;

import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

@Data
public class Wish {

    public Integer id;
    public Integer user_id;
    @NotEmpty
    public String title;
    @NotEmpty
    public String detail;
    public String status;
    public String reward;
    @NotEmpty
    public String grade;
    public String created_at;

    public String lan(String en){
        String cn = "";
        switch (en){
            case "unread":
                 cn = "未读";break;
            case "read":
                cn =  "已读";break;
            case "tips":
                cn =  "提示";break;
            case "medium":
                cn =  "一般";break;
        }
        return cn;
    }
}
